﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucComment" TagName="Comment" Src="../Common/Inc/Comment.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Crd4010b.aspx.cs" Inherits="Updms.Crd.Crd4010b" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>▒ UPDMS [Crd4010b] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>
<table id="table_frame">
	<tr>
		<td id="contents_area">
			<!-- 제목 시작 -->
			<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Crd4010b" runat="server"></ucTabTitle:TabTitle>
			<!-- 제목 끝 -->
			<!-- AJAX 시작 -->
			<asp:UpdatePanel ID="UpdatePanel1" runat="server">
			<Triggers>
				<asp:PostBackTrigger ControlID="ibtn_upload"/>
			</Triggers>
			<ContentTemplate>
			<!-- 버튼 시작 -->
			<div class="button_area">
				<asp:linkbutton id="ibtn_close" Text="닫기" runat="server" CssClass="ibtn ibtn_close" OnClientClick="javascript:window.close();return false;"></asp:linkbutton>
				<asp:linkbutton id="ibtn_confirm" Text="확정" runat="server" CssClass="ibtn ibtn_confirm" OnClick="ibtn_confirm_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_verify" Text="검증" runat="server" CssClass="ibtn ibtn_verify" OnClick="ibtn_verify_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_search" Text="검색" runat="server" CssClass="ibtn ibtn_search" OnClick="ibtn_search_Click"></asp:linkbutton>
			</div>
			<!-- 버튼 끝 -->
			<!-- 검색 시작 -->
			<table class="table_search">
				<tr>
					<td style="text-align:center;" class="ctl" width="12%" rowspan="3"><img id="img_card_image" alt="" height="60" runat="server" /></td>
					<td class="lbl"><asp:Literal id="ltr_template" Text="템플릿" runat="server" /></td>
					<td class="ctl" colspan="3"><a href="../Common/Batch/Template/Crd4010b_template.xls" target="_blank"><img src="../Common/Images/disk.png" alt="template"></a></td>
				</tr>
				<tr>
					<td class="lbl"><asp:Literal id="ltr_file" Text="파일" runat="server" /></td>
					<td class="ctl" colspan="3">
						<ul class="horizontal">
							<li style="width:20%;padding:1px;"><input class="ib_file" id="file_excel" type="file" runat="server" /></li>
							<li style="width:20%;padding:1px 0 1px 0;"><asp:LinkButton id="ibtn_upload" Text="업로드" runat="server" CssClass="ibtn ibtn_upload" OnClick="ibtn_upload_Click"></asp:LinkButton></li>
							<li style="width:60%;"></li>
						</ul>
					</td>
				</tr>
				<tr>
					<td class="lbl" width="11%"><asp:Literal id="ltr_card_nm" Text="카드" runat="server" /></td>
					<td class="ctl" width="33%"><asp:Label ID="lbl_card_nm" runat="server" /></td>
					<td class="lbl" width="11%"><asp:Literal id="ltr_paymnt_dt" Text="결제일" runat="server" /></td>
					<td class="ctl" width="33%"><asp:Label ID="lbl_paymnt_dt" runat="server" /></td>
				</tr>
			</table>
			<!-- 검색 끝 -->
			<!-- 리스트셋 시작 -->
			<table id="table_list_set" cellpadding="0" cellspacing="0" border="0" width="100%" runat="server">
				<tr>
					<td style="width:50%;" valign="top">
						<div style="padding-bottom:8px;" class="sub_title_icon"><asp:Literal id="ltr_excel_data" Text="엑셀 데이터" runat="server" /><asp:linkbutton id="ibtn_save" Text="저장" runat="server" CssClass="ibtn ibtn_save" OnClientClick="return chkSave();" OnClick="ibtn_save_Click"></asp:linkbutton></div>
						<!-- 리스트 시작 -->
						<asp:GridView ID="GridView1" CssClass="table_gridview" GridLines="None" runat="server" ShowFooter="true" AutoGenerateColumns="False" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound">
							<Columns>
								<asp:TemplateField HeaderText="S">
									<ItemTemplate>
										<input id="cb_check_card" class="cb" type="checkbox" runat="server" />
									</ItemTemplate>
									<ItemStyle HorizontalAlign="Center" />
								</asp:TemplateField>
								<asp:BoundField DataField="Biz_Dt" HeaderText="날짜"  DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" />
								</asp:BoundField>
								<asp:BoundField DataField="Div" HeaderText="결제구분">
									<ItemStyle HorizontalAlign="Center" />
								</asp:BoundField>
								<asp:TemplateField HeaderText="내용">
									<ItemTemplate>
										<asp:LinkButton ID="lbtn_rc" runat="server" Text='<%# Bind("Contents") %>'></asp:LinkButton>
									</ItemTemplate>
									<HeaderStyle CssClass="lbtn_rc" />
									<ItemStyle HorizontalAlign="Left" />
								</asp:TemplateField>
								<asp:BoundField DataField="Amount" HeaderText="금액" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Right" />
								</asp:BoundField>
							</Columns>
							<EmptyDataTemplate>
								<div id="no_data"></div>
							</EmptyDataTemplate>
						</asp:GridView>
						<!-- 리스트 끝 -->
					</td>
					<td style="width:1%;"></td>
					<td style="width:49%;" valign="top"><div style="padding-bottom:8px;" class="sub_title_icon"><asp:Literal id="ltr_db_data" Text="DB 데이터" runat="server" /></div>
						<!-- 리스트 시작 -->
						<asp:GridView ID="GridView2" CssClass="table_gridview" GridLines="None" runat="server" ShowFooter="true" AutoGenerateColumns="False"  OnRowDataBound="GridView2_RowDataBound" DataKeyNames="Account">
							<Columns>
								<asp:TemplateField HeaderText="S">
									<ItemTemplate>
										<input id="cb_check_updms" class="cb" type="checkbox" runat="server" />
									</ItemTemplate>
									<ItemStyle HorizontalAlign="Center" />
								</asp:TemplateField>
								<asp:BoundField DataField="Biz_Dt" HeaderText="날짜"  DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" />
								</asp:BoundField>
								<asp:BoundField DataField="Div" HeaderText="결제구분">
									<ItemStyle HorizontalAlign="Center" />
								</asp:BoundField>
								<asp:BoundField DataField="Contents" HeaderText="내용" HtmlEncode="False">
									<HeaderStyle CssClass="lbtn_rc" />
									<ItemStyle HorizontalAlign="Left" />
								</asp:BoundField>											
								<asp:BoundField DataField="Amount" HeaderText="금액" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Right" />
								</asp:BoundField>
							</Columns>
							<EmptyDataTemplate>
								<div id="no_data"></div>
							</EmptyDataTemplate>
						</asp:GridView>
						<!-- 리스트 끝 -->
					</td>
				</tr>
			</table>
			<br />
			<!-- 리스트셋 끝 -->
			<table id="table_detail_1" class="table_detail" runat="server">
				<tr>
					<td style="width:20%;" class="lbl"><asp:Literal id="ltr_balance_amount" Text="차액" runat="server" /></td>
					<td style="width:80%;" class="ctl"><asp:Label ID="lbl_balance_amount" CssClass="b color_red" runat="server" /></td>
				</tr>
			</table>
			<!-- 설명 시작 -->
				<ucComment:Comment id="Comment" runat="server" TagPrefixs="Crd4010b"></ucComment:Comment>
			<!-- 설명 끝 -->
			<!-- 카피라이트 시작 -->
			<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
			<!-- 카피라이트 끝 -->
			</ContentTemplate>
			</asp:UpdatePanel>
			<!-- AJAX 끝 -->
		</td>
	</tr>
</table>
</form>
<script type="text/javascript" language="javascript" defer="defer">
	//저장
	function chkSave() {
		if (!isCheckedOnGridView("GridView1", 0)) {
			msgBox.alert(getMsg(MSG_ERR_085));	//저장할 항목을 선택해주세요
			return false;
		}
		msgBox.confirm(getMsg(MSG_CFM_000), doSave);	//저장하시겠습니까?
		return false;
	}

	//확정
	function chkConfirm(ls_card_nm, ls_paymnt_dt) {
		msgBox.confirm(getMsg(MSG_CFM_004, [ls_card_nm, ls_paymnt_dt]), doConfirm); //@, @일자 확정처리 하시겠습니까?
		return false;
	}

	function doConfirm() {
		if (isMsgBoxYes()) {
			__doPostBack('ibtn_confirm', '');
		}
	}
	
</script>
</body>
</html>